import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int num = scan.nextInt();
            if (num == 0) {
                break;
            }
            int count = 0;
            while (num >= 2) {
                num = (int) Math.ceil((double)num/3);
                count ++;
            }
            System.out.println(count);
        }
    }
}
